package com.example.controller;

import com.example.service.UserServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api("美容管理的接口文档")
public class UserWorld {
    @Autowired
    private UserServiceImpl userService;

    @GetMapping("/list")
    @ApiOperation("登录")
    public String say() {
        userService.queryAll().forEach((user) -> {
            System.out.println(user.getId() + "," + user.getName() + "");
        });
        return "Hello World";
    }
}
